home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
mxcode
/
gsrc211
/
ana.asm
next >
Wrap
Assembly Source File
|
1994-03-11
|
2KB
|
71 lines
proc SetAnalyzerVolumes
push ax bx cx
xor dx,dx
mov ax,cx
shl ax,8
mov bx,640
div bx
mov [cs:Chan1Volume],ax
mov [cs:Chan2Volume],ax
mov [cs:Chan3Volume],ax
mov [cs:Chan4Volume],ax
pop cx bx ax
ret
endp SetAnalyzerVolumes
proc SpectrumAnalyzer
push ax bx cx dx si di
or ax,ax
jz saend
push ax
xor ch,ch
mov cl,[cs:si+MS.volume]
call SetAnalyzerVolumes
xor dx,dx
mov ax,cx
shl ax,8
mov bx,682
div bx
mov cx,ax
mov dx,ax
shr dx,1
mov bx,offset AnalyzerHeights
pop si
sub si,113
mov ax,743
sub ax,si
mul ax
mov si,25093
div si
mov si,ax
cmp si,46
jb saskip
mov si,45
saskip: shl si,1
add [cs:bx+si],cx
cmp [Word cs:bx+si],36
jb saskip2
mov [Word cs:bx+si],36
saskip2: or si,si
jz saskip3
add [cs:bx+si-2],dx
cmp [Word cs:bx+si-2],36
jb saskip3
mov [Word cs:bx+si-2],36
saskip3: cmp si,44
jz saend
add [cs:bx+si+2],dx
cmp [Word cs:bx+si+2],36
jb saend
mov [Word cs:bx+si+2],36
saend: pop di si dx cx bx ax
ret
endp SpectrumAnalyzer
AnalyzerHeights dw 46 dup (0)
Chan1Volume dw 0
Chan2Volume dw 0
Chan3Volume dw 0
Chan4Volume dw 0